import { History, Location } from 'history'
import { RouterStore } from 'mobx-react-router'
import { match } from 'react-router'
import { CreateStudentModel } from './createStudentStore'
import { GlobalStoreModel } from './globalStore'
import { HomeStoreModel } from './homeStore'
import { StudentDetailStoreModel } from './studentDetail'

export const routingStore = new RouterStore()

export { default as globalStore } from './globalStore'

export { default as homeStore } from './homeStore'

export interface BaseStore {
  location: Location
  history: History
  globalStore: GlobalStoreModel
}

export interface BaseProps {
  location?: Location
  history?: History
  match?: match
  children?: React.ReactNode
}

export interface ComponentStore extends BaseStore {
  homeStore: HomeStoreModel,
  createStudentStore: CreateStudentModel
  studentDetailStore: StudentDetailStoreModel
}
